# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=katomic
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/games/org.kde.katomic"
pkgdesc="A fun and educational game built around molecular geometry"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kcoreaddons-dev kconfig-dev kcrash-dev kwidgetsaddons-dev ki18n-dev kxmlgui-dev knewstuff-dev kdoctools-dev kdbusaddons-dev libkdegames-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/katomic-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="757d63edb5541ad8cf8524b7bfcd9f42c9ee0b5ceb3fd90120442a8ca58c40779ac0c53f0c66f238c46d7917590cdc2d7c18e5a8a8126b8271c5b68b680f3370  katomic-20.04.3.tar.xz"
